import request from '@/utils/request'

/**
 * 管理员登录
 * @param {用户名} userAccount
 * @param {密码} password
 * @returns
 */
export const loginService = (userAccount, password) => {
  return request.post('/sysUser/login', {
    userAccount,
    password
  })
}

/**
 * 获取管理员用户信息
 * @returns
 */
export const getUserInfoService = () => {
  return request.get('/sysUser/info')
}

/**
 * 管理员退出登录
 * @returns
 */
export const logoutService = () => {
  return request.delete('/sysUser/logout')
}
